<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生日快乐！</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #ffebeb;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            margin: 0;
            overflow: hidden;
        }
 
        .container {
            text-align: center;
            position: relative;
        }
 
        h1 {
            color: #e91e63;
            font-size: 3em;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
            margin-bottom: 20px;
            animation: pulse 1.5s infinite;
        }
 
        .cake {
            font-size: 100px;
            margin: 20px 0;
            animation: bounce 2s infinite;
        }
 
        .message {
            background-color: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            max-width: 500px;
            margin: 0 auto;
        }
 
        .balloon {
            position: absolute;
            width: 50px;
            height: 60px;
            background-color: #e91e63;
            border-radius: 50%;
            animation: float 8s infinite;
        }
 
        .balloon:before {
            content: "";
            position: absolute;
            width: 4px;
            height: 60px;
            background-color: #777;
            bottom: -60px;
            left: 50%;
            transform: translateX(-50%);
        }
 
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
 
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }
 
        @keyframes float {
            0% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-100px) rotate(5deg); }
            100% { transform: translateY(0) rotate(0deg); }
        }
 
        .firework {
            position: absolute;
            width: 5px;
            height: 5px;
            border-radius: 50%;
            box-shadow: 0 0 10px 5px rgba(255, 235, 59, 0.7);
            animation: explode 1s ease-out infinite;
            opacity: 0;
        }
 
        @keyframes explode {
            0% { transform: scale(0); opacity: 1; }
            100% { transform: scale(20); opacity: 0; }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>生日快乐！</h1>
        <div class="cake">🎂</div>
        <div class="message">
            <p>在这个特别的日子里，</p>
            <p>愿你的每一天都充满快乐和幸福，</p>
            <p>愿所有的梦想都能实现，</p>
            <p>愿所有的希望都能如愿！</p>
            <p>生日快乐！🎉</p>
        </div>
    </div>
 
    <!-- 气球 -->
    <div class="balloon" style="left: 20%; top: 10%; animation-delay: 0s;"></div>
    <div class="balloon" style="left: 80%; top: 15%; animation-delay: 1s; background-color: #2196F3;"></div>
    <div class="balloon" style="left: 30%; top: 5%; animation-delay: 2s; background-color: #4CAF50;"></div>
    <div class="balloon" style="left: 70%; top: 20%; animation-delay: 3s; background-color: #FFC107;"></div>
 
    <!-- 烟花 -->
    <div class="firework" style="left: 30%; top: 30%; animation-delay: 0.5s;"></div>
    <div class="firework" style="left: 70%; top: 40%; animation-delay: 1s; background-color: #E91E63;"></div>
    <div class="firework" style="left: 50%; top: 60%; animation-delay: 1.5s; background-color: #3F51B5;"></div>
 
    <script>
        // 点击页面任何地方创建烟花效果
        document.addEventListener('click', function(e) {
            createFirework(e.clientX, e.clientY);
        });
 
        function createFirework(x, y) {
            const colors = ['#FF5722', '#e91e1e', '#9C27B0', '#673AB7', '#3F51B5', '#2196F3', '#00BCD4', '#009688', '#4CAF50', '#8BC34A', '#CDDC39', '#FFEB3B', '#FFC107', '#FF9800'];
 
            for (let i = 0; i < 5; i++) {
                const firework = document.createElement('div');
                firework.className = 'firework';
                firework.style.left = x + 'px';
                firework.style.top = y + 'px';
                firework.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
                firework.style.animationDelay = Math.random() * 0.5 + 's';
                document.body.appendChild(firework);
 
                // 动画结束后移除元素
                setTimeout(() => {
                    firework.remove();
                }, 1000);
            }
        }
 
        // 自动创建一些烟花
        setInterval(() => {
            const x = Math.random() * window.innerWidth;
            const y = Math.random() * window.innerHeight * 0.6;
            createFirework(x, y);
        }, 2000);
    </script>
</body>
</html>